using System;
using System.Text;
using System.Collections;

namespace Antix.Mail
{
    /// <summary>
    /// MailAttachment collection
    /// </summary>
    public class AttachmentCollection : CollectionBase
    {
        #region Constructors etc.

        #endregion

        #region Properties

        #endregion

        #region Methods

        /// <summary>
        /// Add a new attachment
        /// </summary>
        public Attachment Add()
        {
            Attachment newItem = new Attachment();
            this.Add(newItem);

            return newItem;
        }

        /// <summary>
        /// Add existing attachment
        /// </summary>
        public int Add(Attachment item)
        {
            return this.List.Add(item);
        }

        /// <summary>
        /// Add a new attachment with existing headers
        /// </summary>
        internal Attachment Add(MessageContentHeaders headers, string dataRaw)
        {
            Attachment newItem = new Attachment(headers, dataRaw);
            this.Add(newItem);

            return newItem;
        }

        #endregion
    }

}
